﻿
Imports System.Data
Imports VSModel
Imports Cls_Common
Imports SecurityService

Partial Class FrontEnd_Control_Header
    Inherits System.Web.UI.UserControl
    Public __o As Object
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim lstNode As New DataSet
            lstNode.ReadXml(MapPath("../../xml/HeaderMenu.xml"))
            With rptMenu
                .DataSource = lstNode.Tables("Node")
                .DataBind()
            End With
        End If
    End Sub
    Protected Sub rptMenu_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptMenu.ItemDataBound
        Dim hplTitle As HyperLink = CType(e.Item.FindControl("hplTitle"), HyperLink)
        hplTitle.NavigateUrl = MainDomain & e.Item.DataItem("URL").ToString
        hplTitle.Text = e.Item.DataItem("Title")
    End Sub

    Protected Sub btnSeachTop_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSeachTop.Click
        Response.Redirect(MainDomain & "ket-qua-tim-kiem.html?s=" & txtSeachTop.Text)
    End Sub
End Class
